<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html>
<head>
    <%@ include file="/include/tasklibs.jsp" %>
    <style>
        .fixed-table-body thead th .th-inner {
            text-align: center;
        }

        .shotline {
            border-bottom: solid 2px #B4B4B4;
        }

        .textAlign-right {
            text-align: right;
        }

        #storeInfoTableContainer {
            display: none;
            padding: 10px;
        }

        .btn-default {
            background-color: #2F4050;
        }

        .dz-success-mark {
            display: none;
        }

        .dz-error-mark {
            display: none;
        }

        .dz-error-message {
            display: none;
        }

        .bv-form .help-block {
            margin-bottom: 0;
        }

        .bv-form .tooltip-inner {
            text-align: left;
        }

        .nav-tabs li.bv-tab-success > a {
            color: #3c763d;
        }

        .nav-tabs li.bv-tab-error > a {
            color: #a94442;
        }

        .bv-form .bv-icon-no-label {
            top: 0;
        }

        .bv-form .bv-icon-input-group {
            top: 0;
            z-index: 100;
        }
    </style>
</head>
<div class="animated fadeInRight">
    <div class="row">
        <div class="col-sm-12">
            <div class="ibox float-e-margins">
                <div class="ibox-content">
                    <form method="post" class="form-horizontal" action="<c:url value="/web/saveParentTask.json" />" id="taskForm">
                        <div class="form-group">
                            <label class="col-sm-2 control-label">门店信息</label>
                            <div class="col-sm-4">
                                <button class="btn btn-default " type="button" id="excelDropzone">
                                    <i class="fa fa-upload"></i>&nbsp;&nbsp;导入Excel
                                </button>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>

<script>
var Controller = {
    taskListTable: null,
    storeInfoTable: null,
    init: function () {
        Controller.initDropzone();
    },
    initDropzone: function () {
        var goUrl = "uploadStoreInfo.json"
        $("#excelDropzone").dropzone({ url: goUrl, acceptedFiles: ".xls,.xlsx", addRemoveLinks: true,
            init: function () {
                this.on("success", function (files, response) {
                    if(response == "success") {
                        alert("导入成功");
                    } else {
                        alert("导入失败");
                    }
                });
            } });
    }
}
$(document).ready(function () {
    Controller.init();
});

</script>

